<?php
// 父类
class Person{
    public $name;
    public function __construct(){
        echo "我是父类的构造函数";
    }
    public function show(){
        echo "我是父类";
    }
}
// 子类
class  Student extends Person{
    public function __construct(){
        Person::__construct();
    }
    
        
    
        //子类中调用父类成员
        public function test(){
            $this->show();
        }
}
$stu = new Student();
// var_dump($stu);
$stu->test();
?>
